import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomePage from '@/views/HomePage.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    component: HomePage
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutUs.vue')
  },
  {
    path: '/introduce',
    name: 'introduce',
    component: () => import('../views/IntroducePage.vue')
  },
  {
    path: '/culture',
    name: 'culture',
    component: () => import('../views/CulturePage.vue')
  },
  {
    path: '/business',
    name: 'business',
    component: () => import('../views/BusinessPage.vue')
  },
  {
    path: '/kuxinyun',
    name: 'kuxinyun',
    component: () => import('../views/KuXinYun.vue')
  },
  {
    path: '/kuzhengtong',
    name: 'kuzhengtong',
    component: () => import('../views/KuZhengTong.vue')
  },
  {
    path: '/huxinyi',
    name: 'huxinyi',
    component: () => import('../views/HuXinYi.vue')
  },
  {
    path: '/kudatax',
    name: 'kudatax',
    component: () => import('../views/KuDataX.vue')
  },
  {
    path: '/development',
    name: 'development',
    component: () => import('../views/DevelopmentPage.vue')
  },
  {
    path: '/honor',
    name: 'honor',
    component: () => import('../views/HonorPage.vue')
  },
  {
    path: '/technology',
    name: 'technology',
    component: () => import('../views/TechnologyPage.vue')
  },
  {
    path: '/finance',
    name: 'InnovativeFinance',
    component: () => import('../views/InnovativeFinance.vue')
  },
  {
    path: '/news',
    name: 'news',
    component: () => import('../views/newsPage.vue')
  },
  {
    path: '/newsDetail',
    name: 'newsDetail',
    component: () => import('../views/newsDetail.vue')
  },
  {
    path: '/concat',
    name: 'concat',
    component: () => import('../views/concatPage.vue')
  },
  {
    path: '/concatDetail',
    name: 'concatDetail',
    component: () => import('../views/concatPage.vue')
  },
  {
    path: '/media',
    name: 'media',
    component: () => import('../views/newsPage.vue')
  },
  {
    path: '/jobDetail',
    name: 'jobDetail',
    component: () => import('../views/jobDetail.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
  scrollBehavior (to, from, savedPosition) {
    return { top: 0 }
  }
})

export default router
